package com.company.cloud.oss.modules.cloud.models;

import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ImgInfoModel {



    public String getImgFormat(){
        if(this.Format==null){
            return null;
        }
        return this.Format.getValue();
    }

    public int getImgHeight(){
        if(this.ImageHeight==null){
            return 0;
        }
        if(StrUtil.isEmpty(this.ImageHeight.getValue())){
            return 0;
        }
        return Integer.parseInt(this.ImageHeight.getValue());
    }

    public int getImgWidth(){
        if(this.ImageWidth==null){
            return 0;
        }
        if(StrUtil.isEmpty(this.ImageWidth.getValue())){
            return 0;
        }
        return Integer.parseInt(this.ImageWidth.getValue());
    }

    public int getImgSize(){
        if(this.FileSize==null){
            return 0;
        }
        if(StrUtil.isEmpty(this.FileSize.getValue())){
            return 0;
        }
        return Integer.parseInt(this.FileSize.getValue());
    }


    /***/
    private ImgItemModel FileSize;

    /***/
    private ImgItemModel Format;

    /***/
    private ImgItemModel ImageHeight;

    /***/
    private ImgItemModel ImageWidth;

    /***/
    private ImgItemModel ResolutionUnit;

    /***/
    private ImgItemModel XResolution;

    /***/
    private ImgItemModel YResolution;

    //==============================

    /***/
    private ImgItemModel Compression;

    /***/
    private ImgItemModel DateTime;

    /***/
    private ImgItemModel ExifTag;
    /***/
    private ImgItemModel GPSLatitude;

    /***/
    private ImgItemModel GPSLatitudeRef;

    /***/
    private ImgItemModel GPSLongitude;
    /***/
    private ImgItemModel GPSLongitudeRef;

    /***/
    private ImgItemModel GPSMapDatum;

    /***/
    private ImgItemModel GPSTag;

    /***/
    private ImgItemModel GPSVersionID;

    /***/
    private ImgItemModel JPEGInterchangeFormat;


    /***/
    private ImgItemModel JPEGInterchangeFormatLength;


    /***/
    private ImgItemModel Orientation;


    /***/
    private ImgItemModel Software;



}
